<%#
 Copyright 2013-2018 the original author or authors from the JHipster Phipster project.

 This file is part of the JHipster project, see https://www.jhipster.tech/
 for more information.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
package <%=packageName%>.service.<%=context.extraInstance%>;
import java.util.List;
import java.util.Optional;
import <%=packageName%>.domain.<%=context.entityClass%>;

public interface <%=context.entityClass%><%=context.extraName%>Service {

    /**
     * 保存列表中的数据
     *
     * @param <%=context.entityInstancePlural%> 列表数据
     * @return 返回保存完毕的列表
     */
    List<<%=context.entityClass%>> save(List<<%=context.entityClass%>> <%=context.entityInstancePlural%>);

    /**
     * 保存单条数据，如果字段不存在则保持原来的数据不变
     *
     * @param <%=context.entityInstancePlural%> 需要保存的数据
     * @return 返回保存完毕的数据
     */
    Optional<<%=context.entityClass%>> save(<%=context.entityClass%> <%=context.entityInstancePlural%>);

    /**
     * 删除列表中的数据
     *
     * @param <%=context.entityInstancePlural%> 数据列表
     */
    void delete(List<<%=context.entityClass%>> <%=context.entityInstancePlural%>);
}
